<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>reason</title>
    <script src="../../lib/vue.js"></script>
</head>
<body>
    <div id="app">
        <mycom></mycom>
        <mycom></mycom>

    </div>

    <template id="tmp">
        <div>
            <input type="button" value="+1" @click="incr" />
            <h4>{{ count }}</h4>


        </div>
    </template>
    <script>

        Vue.component('mycom',{
            template:"#tmp",
            data:function(){
                return {
                    count:0
                }
            },
            methods:{
                incr(){
                    this.count++;
                }
            }

        });

        var vue = new Vue({
            el:'#app',
            data:{

            },
            methods:{

            }
        });
    </script>
</body>
</html>